<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateApplicantThirdTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('applicant_third', function (Blueprint $table) {
            $table->increments('id')->comment('自增id');
            $table->string('provider_id',30)->unique()->comment('第三方登录id');
            $table->string('email',50)->default('')->comment('第三方登录邮箱');
            $table->string('source',30)->default('')->comment('第三方授权来源');
            $table->timestamps();
        });

//        $router->get('/google', 'Frontend\LoginController@googleToThird');
//        // google第三方登录回调
//        $router->get('/google/callback', 'Frontend\LoginController@googleCallback');
//        // facebook第三方登录
//        $router->get('/facebook', 'Frontend\LoginController@facebookToThird');
//        // facebook第三方登录回调
//        $router->get('/facebook/callback', 'Frontend\LoginController@facebookCallback');
//        // twitter第三方登录
//        $router->get('/twitter', 'Frontend\LoginController@twitterToThird');
//        // twitter第三方登录回调
//        $router->get('twitter/callback', 'Frontend\LoginController@twitterCallback');
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('applicant_third');
    }
}
